home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / scm / xscm.lha / xscm / Imakefile < prev    next >
Encoding:
Makefile  |  1992-08-29  |  4.6 KB  |  193 lines

  1. /*
  2.  * $Header: /home/campbell/Languages/Scheme/scm/x-scm/RCS/Imakefile,v 1.9 1992/08/29 01:19:34 campbell Beta $
  3.  *
  4.  * Imakefile for x-scm, the X11 sidecar for scm.  This expects to be
  5.  * installed as a subdirectory within the scm build directory.
  6.  *
  7.  * Author: Larry Campbell (campbell@redsox.bsw.com)
  8.  *
  9.  * Copyright 1992 by The Boston Software Works, Inc.
  10.  * Permission to use for any purpose whatsoever granted, as long
  11.  * as this copyright notice remains intact.  Please send bug fixes
  12.  * or enhancements to the above email address.
  13.  */
  14.  
  15. IMAKE = imake
  16.  
  17. /*
  18.  * Most systems have Motif or OpenLook, but not both.  If your
  19.  * system lacks one, comment out the corresponding line here.
  20.  * Or, define the corresponding -DSUPPRESS_xxx macro on your Imake
  21.  * command line.
  22.  */
  23. #ifndef SUPPRESS_MOTIF
  24. # define HAVE_MOTIF
  25. #endif
  26.  
  27. #ifndef SUPPRESS_OPENLOOK
  28. # define HAVE_OPENLOOK
  29. #endif
  30.  
  31. /* Where to install binaries */
  32. BINDIR=/usr/local/bin
  33.  
  34. /* Where to install Scheme code */
  35. SLIB_DIR=/usr/lib/scheme
  36.  
  37. /* Where the scm sources reside (typically ..) */
  38. SCMSRCDIR = ..
  39.  
  40. /* Where to find scm and X11 include files */
  41. INCLUDES = -I$(SCMSRCDIR) -I/usr/include/X11
  42.  
  43. /*
  44.  * -DFLOATS is only required because of the screwy way
  45.  * the sys_protects are defined in scm.h.
  46.  *
  47.  * If you're using the default (non-ANSI) C compiler on a Sequent
  48.  * box, you have to define _NO_PROTO, otherwise prototypes in the
  49.  * Motif headers will give the compiler heartburn.
  50.  */
  51. #ifdef _SEQUENT_
  52. CFLAGS = $(INCLUDES) -O -DSYSV -DFLOATS -D_NO_PROTO
  53. #else
  54. CFLAGS = $(INCLUDES) -O -DSYSV -DFLOATS
  55. #endif
  56.  
  57. /*
  58.  * Object modules from scm that we must link (this list may need
  59.  * to be updated as scm evolves, >sigh<)
  60.  */
  61. SCMOBJS =            \
  62.     $(SCMSRCDIR)/fscl.o    \
  63.     $(SCMSRCDIR)/feval.o    \
  64.     $(SCMSRCDIR)/funif.o    \
  65.     $(SCMSRCDIR)/repl.o    \
  66.     $(SCMSRCDIR)/sc2.o    \
  67.     $(SCMSRCDIR)/subr.o    \
  68.     $(SCMSRCDIR)/sys.o    \
  69.     $(SCMSRCDIR)/time.o
  70.  
  71. /*
  72.  * You shouldn't need to modify anything after this point.
  73.  */
  74.  
  75.  
  76. all: pgms
  77.  
  78. pgms::    xscm
  79.  
  80. InstallProgram(xscm,$(BINDIR))
  81.  
  82. #ifdef HAVE_MOTIF
  83. pgms::    xmscm
  84.  
  85. InstallProgram(xmscm,$(BINDIR))
  86. #endif
  87.  
  88. #ifdef HAVE_OPENLOOK
  89. pgms::    olscm
  90.  
  91. InstallProgram(olscm,$(BINDIR))
  92. #endif
  93.  
  94. InstallNonExec(assert.scm,$(SLIB_DIR))
  95. InstallNonExec(x11.scm,$(SLIB_DIR))
  96. InstallNonExec(xt.scm,$(SLIB_DIR))
  97. InstallNonExec(xw.scm,$(SLIB_DIR))
  98. InstallNonExec(xm.scm,$(SLIB_DIR))
  99. InstallNonExec(ol.scm,$(SLIB_DIR))
  100. InstallNonExec(xmsubs.scm,$(SLIB_DIR))
  101. InstallNonExec(olsubs.scm,$(SLIB_DIR))
  102. InstallNonExec(xevent.scm,$(SLIB_DIR))
  103.  
  104. NormalProgramTarget(xscm,xscm.o x.o,,$(SCMOBJS) $(XLIB),-lm)
  105.  
  106. NormalProgramTarget(xmscm,xmscm.o x.o,libxm.a,libxm.a $(SCMOBJS) -lXm -lXt $(XLIB),-lm)
  107.  
  108. NormalProgramTarget(olscm,olscm.o x.o,libol.a,libol.a $(SCMOBJS) -lXol -lXt $(XLIB),-lm)
  109.  
  110. OLOBJS = xt-ol.o ol.o
  111. XMOBJS = xt-xm.o xm.o
  112.  
  113. libxm.a: $(XMOBJS)
  114.     ar rc libxm.a $(XMOBJS)
  115.  
  116. libol.a: $(OLOBJS)
  117.     ar rc libol.a $(OLOBJS)
  118.  
  119. /*
  120.  * Note:  it is important that the inits get called in the following order:
  121.  *   init_x, init_xt, init_{toolkit}
  122.  * because SMOBs are defined by the init functions and later inits may
  123.  * use SMOBs defined by earlier ones.
  124.  */
  125. xscm.o:    $(SCMSRCDIR)/scm.c $(SCMSRCDIR)/scm.h $(SCMSRCDIR)/config.h $(SCMSRCDIR)/patchlvl.h
  126.     $(CC) $(CFLAGS) -c -DINITS=init_x\(\) $(SCMSRCDIR)/scm.c
  127.     $(MV) scm.o xscm.o
  128.  
  129. olscm.o:    $(SCMSRCDIR)/scm.c $(SCMSRCDIR)/scm.h $(SCMSRCDIR)/config.h $(SCMSRCDIR)/patchlvl.h
  130.     $(CC) $(CFLAGS) -c -DINITS=init_x\(\)\;init_xt\(\)\;init_ol\(\) $(SCMSRCDIR)/scm.c
  131.     $(MV) scm.o olscm.o
  132.  
  133. xmscm.o:    $(SCMSRCDIR)/scm.c $(SCMSRCDIR)/scm.h $(SCMSRCDIR)/config.h $(SCMSRCDIR)/patchlvl.h
  134.     $(CC) $(CFLAGS) -c -DINITS=init_x\(\)\;init_xt\(\)\;init_xm\(\) $(SCMSRCDIR)/scm.c
  135.     $(MV) scm.o xmscm.o
  136.  
  137. ol.o:    ol.c x.h xt.h
  138.     $(CC) $(CFLAGS) -c ol.c
  139.  
  140. x.o:    x.c xevent.h x.h version.h
  141.  
  142. xevent.h xevent.scm: xgen.scm
  143.     scm xgen
  144.  
  145. xm.o: xm.c x.h xt.h
  146.     $(CC) $(CFLAGS) -DMOTIF -c xm.c
  147.  
  148. xt-xm.o: xt.c x.h xt.h
  149.     $(CC) $(CFLAGS) -DMOTIF -c xt.c
  150.     $(MV) xt.o xt-xm.o
  151.     
  152. xt-ol.o: xt.c x.h xt.h
  153.     $(CC) $(CFLAGS) -c xt.c
  154.     $(MV) xt.o xt-ol.o
  155.  
  156. README: README.template
  157.     ./versionify <README.template >README
  158.  
  159. Makefile.std:    Imakefile
  160.     imake -I/usr/X4/lib/config -DUseInstalled -s Makefile.std
  161.  
  162. PART1 =    README INSTALL Imakefile Makefile.std xgen.scm x.h xt.h
  163.  
  164. PART2 =    version.h x.c
  165.  
  166. PART3 =    xt.c xm.c ol.c
  167.  
  168. PART4 =    assert.scm x11.scm xm.scm xt.scm xw.scm ol.scm \
  169.     olsubs.scm xmsubs.scm
  170.  
  171. PART5 =    oltest.scm xmtest.scm xelk.scm \
  172.     xhello.scm xftp.scm xcolorselect.scm xmandel.scm
  173.  
  174. shar: part1.shar part2.shar part3.shar part4.shar part5.shar
  175.  
  176. part1.shar: $(PART1)
  177.     shar $(PART1) >$@
  178.  
  179. part2.shar: $(PART2)
  180.     shar $(PART2) >$@
  181.  
  182. part3.shar: $(PART3)
  183.     shar $(PART3) >$@
  184.  
  185. part4.shar: $(PART4)
  186.     shar $(PART4) >$@
  187.  
  188. part5.shar: $(PART5)
  189.     shar $(PART5) >$@
  190.  
  191. clean::
  192.     rm -f *.shar xevent.h xevent.scm README Makefile Makefile.std
  193.